/**
 * Copyright 2009 University of  Washington
 * This code is released under the GPL version 3 - with a copy of the license included
 * @author Maya Hao Li
 *
 */
package seedpod.webapp.view.htmlwidget;

public class Label extends GenericHtmlWidget
{
  private String label;

  public Label (String labelText)
  {
    label = labelText;
  }

  public Label(String widgetID, String labelText)
  {
    super(widgetID);
    label = labelText;
  }

  public String render()
  {
    String l = "<span ";
    if (_widgetID.length() > 0)
      l += ATT("id", _widgetID);
    if (_cssClass.length()>0)
      l += ATT("class", _cssClass );
    l += ">";
    l += label;
    l += "</span>";
    return l;
  }

}